package adv3;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class StuTest {
    public static void main(String[] args) {
        //Student s=new Student("小王",22,"妖怪");
        Student s=new Student("小王",22,Sex.男);
        Sex s1=Sex.女;
        String n=s1.name();
        System.out.println(n);
        System.out.println(s1.ordinal());
        System.out.println(">>>>>>>>>>>>");
        Scanner in=new Scanner(System.in);
        System.out.println("请输入性别：");
        String sexstr=in.next();
        Sex sex2=Sex.valueOf(sexstr);
        System.out.println("您是："+sex2);
    }
}
